<?php



class Merchant_Service_FactoryValidate{

    public static function factoryMethod($orderInfo) {
        $shipping_method = $orderInfo['shipping_method'];
        $modile = ucfirst(strtolower($shipping_method));
        $class ='Merchant_Model_Validate_'.$modile.'--Validate';

        if(class_exists($class)){
            $obj = new $class($orderInfo);
        }else{
            $obj = new Merchant_Model_Validate_CommonValidate($orderInfo);
        }
        return $obj->validator();
    }
}

?>